﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using EZCRS.HCMS.Entity;
using EZCRS.HCMS.SqlClient;


namespace EZCRS.HCMS.Bll.baseinfo
{
    public class BllHCRS_channel
    {
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="page">当前页数</param>
        /// <param name="pagecount">总页数</param>
        /// <param name="swhere">查询条件</param>
        /// <returns></returns>
        public List<HCRS_channel> getallbypage(int page, out int pagecount, string swhere)
        {
            //查询条件
            string strwhere = "";

            return new sql_HCRS_channel().getallbypage(page, strwhere, out pagecount);
        }

        /// <summary>
        /// 获得所有符合条件的记录
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public List<HCRS_channel> getitem(string search)
        {
            string sqlwhere = "";
            return new sql_HCRS_channel().getall(sqlwhere);
        }

        /// <summary>
        /// 获得一条记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public HCRS_channel getitem(int id)
        {
            return new sql_HCRS_channel().getitem(id);
        }

        #region 删除
        /// <summary>
        /// 删除一条记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool deleteitem(int id)
        {
            return new sql_HCRS_channel().deleteitem(id);
        }

        /// <summary>
        /// 删除一系列数据
        /// </summary>
        /// <param name="idlist"></param>
        /// <returns></returns>
        public bool deleteitem(string idlist)
        {
            return new sql_HCRS_channel().deleteitem(idlist);
        }
        #endregion

        /// <summary>
        /// 添加或修改
        /// </summary>
        /// <param name="_log"></param>
        /// <returns></returns>
        public bool insertorupdateitem(HCRS_channel _log)
        {
            return new sql_HCRS_channel().insertorupdate(_log);
        }


    }
}
